
import pandas as pd

import plotly.express as px

data = {
    'Date': ['2024-01-01', '2024-01-01', '2024-01-02', '2024-01-02', '2024-01-03', '2024-01-03'],
    'Product': ['A', 'B', 'A', 'B', 'A', 'B'],
    'Sales': [100, 150, 120, 110, 130, 120]
}
df = pd.DataFrame(data)
result = df.groupby('Product')['Sales'].agg(['sum', 'mean'])
print(result)
